<?php

namespace App\Common\Constant;


class CacheKey
{
    const SMS_VERIFY_KEY = 'smsVerify';
    const PROVINCE_LIST_KEY = 'provinceList';
    const PROVINCE_CITY_LIST_KEY = 'provinceCityList';
    const PROVINCE_DISTRICT_LIST_KEY = 'provinceDistrictList';
    const CURRENT_USER_KEY = 'user';

    /**
     * 手机短信验证码
     */
    static function smsVerifyKey($phoneNum){
        return self::SMS_VERIFY_KEY . ':' . $phoneNum;
    }

    /**
     * 省份列表
     */
    static function provinceListKey(){
        return self::PROVINCE_LIST_KEY;
    }

    /**
     * 城市列表
     */
    static function provinceCityListKey($province_id){
        return self::PROVINCE_CITY_LIST_KEY . ':' . $province_id;
    }

    /**
     * 区县列表
     */
    static function provinceDistrictListKey($city_id){
        return self::PROVINCE_DISTRICT_LIST_KEY . ':' . $city_id;
    }

    /**
     * 当前用户
     * @return string
     */
    static function currentUserKey($weixinUserid){
        return self::CURRENT_USER_KEY . ':' . $weixinUserid;
    }
}